﻿// Decompiled with JetBrains decompiler
// Type: Netick.INetickScript
// Assembly: Netick, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 6726ECA1-C773-4CF7-8952-E81B30D93B52
// Assembly location: D:\WorkSpaceDemo\UPM\NetickForUnity\Netick\Runtime\Netick.dll
// XML documentation location: D:\WorkSpaceDemo\UPM\NetickForUnity\Netick\Runtime\Netick.xml

#nullable disable
namespace Netick;

/// <summary>
/// A script which can be added to Netick internal simulation loop.
/// </summary>
public interface INetickScript
{
  int Index { get; set; }

  Entity Entity { get; }

  NetickEngine Engine { get; }

  /// <summary>Used to initialize the user script and assign Engine.</summary>
  /// <param name="netickEngine"></param>
  void Initialize(NetickEngine netickEngine);

  /// <summary>
  /// Called when this script has been added to the simulation.
  /// </summary>
  void NetworkStart();

  /// <summary>
  /// Called when this script has been removed from the simulation.
  /// </summary>
  void NetworkDestroy();

  /// <summary>Called every frame. Executed before NetworkFixedUpdate.</summary>
  void NetworkUpdate();

  /// <summary>
  /// Called every fixed-time network update/tick. Any changes/updates to the network state must happen here.
  /// <para>On the client, if you are the Input Source or if this Entity.PredictionMode is set to Global, it will be called several times in one update/tick during resimulations. To check for resimulations, use [<see cref="P:Netick.Entity.IsResimulating" />].</para>
  /// </summary>
  void NetworkFixedUpdate();

  /// <summary>
  /// Called every frame. Executed after NetworkUpdate and NetworkFixedUpdate.
  /// </summary>
  void NetworkRender();

  void NetcodeIntoGameEngine();

  void GameEngineIntoNetcode();
}
